package com.eslserver.core;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

import com.eslserver.core.config.ESLServerConfig;
import com.eslserver.core.config.HTTPServerConfig;

public class STiTEQHTTPServerInitializer {
	public static final Logger LOG = LoggerFactory
			.getLogger(STiTEQHTTPServerInitializer.class);

	public static void initHTTPServer() {
		NodeList elems = ESLServerCore.getESLServerConfig().getDoc()
				.getElementsByTagName(ESLServerConfig.CONFIG);

		try {
			HTTPServerConfig stiteqHttpServerConfig = new HTTPServerConfig();
			stiteqHttpServerConfig.readHTTPServerSourcesFromXml((Element) elems
					.item(0));

		} catch (Exception e) {
			LOG.error("HTTP Server initialization failed", e);
		}
	}

}
